package com.desire.consumer;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class TopicConsumer {

    @RabbitListener(queues = "purchaseQueue")
    public void handlerPurchase(Message message) {
        System.out.println("采购队列消费：" + new String(message.getBody()));
    }

    @RabbitListener(queues = "systemQueue")
    public void handlerSystem(Message message) {
        System.out.println("系统队列消费：" + new String(message.getBody()));
    }

}
